package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.service.ISceneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//区域资源的控制器
@RestController
@RequestMapping("/themes")
public class ThemeController {

    @Autowired
    private ISceneService sceneService;

    /*
    查找某个主题所有的景点
    资源:/themes/{themeId}/scenes
    动作:GET
    参数
     */
    @GetMapping("/{themeId}/scenes")
    public Object listScenes(@PathVariable Long themeId) {
        return sceneService.listScenesByThemeId(themeId);
    }
}
